import os
import pytest
from tools.read_excel_range_as_list_of_dictionary import read_excel_range_as_list_of_dictionary
from tools.split_row import split_row
from tools.parse_week_ranges import parse_week_ranges
@pytest.mark.parametrize("input_range, split_column_name,expected_rows", [
    ("O10:Q10",'O',11),
    # ("O10:Q10",'O',11),
])
def test_split_row(input_range,split_column_name,expected_rows):
    file_path = os.path.join(os.path.dirname(__file__), "read_excel_range_as_list_of_dictionary_test_data.xlsx")
    sheet_name = "TestSheet"
    result = read_excel_range_as_list_of_dictionary(file_path, sheet_name,input_range)
    split_row(result,parse_week_ranges,split_column_name)
    assert len(result) == expected_rows

